package net.tycmc.cty.ctyms.timejob.iems.service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.tycmc.bulb.common.util.DateUtil;
import net.tycmc.cty.ctyms.timejob.iems.dao.AllScanDao;

public class AllScanService {
	
	private  AllScanDao asd;
	
	public AllScanDao getAsd() {
		return asd;
	}
	public void setAsd(AllScanDao asd) {
		this.asd = asd;
	}
	/**
	 * 驾驶行为评分开始
	 * 此Job的执行需要在档位车速统计执行完之后   
	 **/
	public void startWork() {
		//获取上一个七天的开始时间和结束时间
		String last7DayBeginTime=DateUtil.addDay(-14);
		String last7DayendTime=DateUtil.addDay(-8);
		String this7DaybeginTime=DateUtil.addDay(-7);
		String this7DayendTime=DateUtil.addDay(-1);
		Map<String,Object>param=new HashMap<String,Object>();
		asd.ProMiddleTable();
		param.put("beginTime", last7DayBeginTime);
		param.put("endTime", last7DayendTime);
		param.put("flag","2");
		int last7Daynum=asd.getmsgStateInfo(param);
		param.put("beginTime", this7DaybeginTime);
		param.put("endTime", this7DayendTime);
		param.put("flag","1");
		int this7Daynum=asd.getmsgStateInfo(param);
		System.out.println("上7天插入数据"+last7Daynum+"条;近7天插入数据"+this7Daynum+"条；");
	}
	
}
